# 编写函数统计文本中的单词频率
def word_counter(text):
    # 你的代码 here
    # 提示：先去除标点，再分割单词，最后统计
    for i in ",.!":
        text = text.replace(i," ")
    print(text)
    count = 0
    for i in text:
        if i !=' ':
            count += 1
    print(count)
    pass

# 测试
text = "Hello world, hello Python. Python is great!"
print(word_counter(text))